############################ while ########################
value1 = 0;
while value1<10 do 
    puts(value1)
    value1+=1
end
############### begin until if elsif ################
puts "begin until if elsif"
begin 
    if value1 == 8 then 
        value1 -= 1 
        next
    elsif value1 == 6 then 
        value1 -= 1
        redo
    elsif value1 < 5 then break 
    else end
    puts (value1) 
    value1 -= 1
end until value1 < 0 
## 迭代
puts "迭代"
ary = [1,2,3,4,5]
ary.each do |i|
   puts i
end


